package com.ymatou.iapi.login.service;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*免密登入Call
*FreeMaker Template自动生成代码
*/
public class WithoutpwdloginCall extends YmatouBaseCall{
	private static String opurl ="login/withoutpwdlogin";
	
	public WithoutpwdloginCall() {
		super(EnvSetup.getSystemUrl("login_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public Integer getUserId(){
		return getJsonObject().getAsJsonObject("Result").get("userId").getAsInt();
	}
	public String getLoginid(){
		return getJsonObject().getAsJsonObject("Result").get("loginId").getAsString();
	}
	public String getSign(){
		return getJsonObject().getAsJsonObject("Result").get("sign").getAsString();
	}
	public Boolean getSuccess(){
		return getJsonObject().get("Success").getAsBoolean();
	}
	public String getErrorCode(){
		return getJsonObject().get("ErrorCode").getAsString();
	}
	public String getLastErrorMessage(){
		return getJsonObject().get("LastErrorMessage").getAsString();
	}
}